<%--
  Created by IntelliJ IDEA.
  User: LCJ
  Date: 2017/6/19
  Time: 10:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="admin/adminHeader.jsp"%>
<div id="form">
<table border="1" cellpadding="0" cellspacing="0" style="width: 900px;border: #0affe7;align-content: center;font-size: 16px;text-align: center">
    <tr style="height: 30px;background: #00CCFF;color: white">
        <td>编号</td>
        <td>学号</td>
        <td>姓名</td>
        <td>性别</td>
        <td>电话号码</td>
        <td>编辑</td>
        <td>删除</td>
    </tr>
    <c:forEach items="${pm.datas}" var="student">
    <tr>
        <td>${student.id}</td>
        <td>${student.no}</td>
        <td>${student.name}</td>
        <td>
            <c:if test="${student.sex==0}">男</c:if>
            <c:if test="${student.sex==1}">女</c:if>
        </td>
        <td>${student.tell}</td>
        <td>
            <a href="/students/update?id=${student.id}">
                <img style="width: 50px;height: 27px" src="<%=basePath%>resources/img/edit.png"></a>
        </td>
        <td>
            <a href="/students/${student.id}/delete">
                <img style="width: 50px;height: 27px" src="<%=basePath%>resources/img/student_delete.png">
            </a>
        </td>
    </tr>
    <tr><td colspan="5">
    </c:forEach>
<pg:pager url="/tes" items="${pm.total}" export="currentPageNumber=pageNumber">
    <!--访问路径中后置数据.效果如xx.do?method=search-->
    <pg:param name="method" value="search"/>

    <pg:first>
        <a href="${pageUrl}">首页</a>
    </pg:first>
    <pg:prev>
        <a href="${pageUrl }">前页</a>
    </pg:prev>
    <pg:pages>
        <c:choose>
            <c:when test="${currentPageNumber eq pageNumber }">
                <font color="red">${pageNumber }</font>
            </c:when>
            <c:otherwise>
                <a href="${pageUrl }">${pageNumber }</a>
            </c:otherwise>
        </c:choose>
    </pg:pages>
    <pg:next>
        <a href="${pageUrl }">后页</a>
    </pg:next>
    <pg:last>
        <a href="${pageUrl }">尾页</a>
    </pg:last>
</pg:pager>
    </td></tr></table>
    <%@include file="admin/tear.jsp" %>

